﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SupplierManage.aspx.cs" Inherits="Comod_SupplierManage" %>
<%@ Register Src="../usercontrol/PageNavigator.ascx" TagName="PageNavigator" TagPrefix="uc1" %>
<html>
<head id="Head1" runat="server">
    <title>商家管理</title>
    <link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/changerows.js"></script>
    <script type="text/javascript">
    function CheckAll(form) {
	    for (var i=0;i<form.elements.length;i++) {
		    var e = form.elements[i];
		    if (e.name != 'chkall' && e.type=='checkbox')
			    e.checked = form.chkall.checked;
	    }
    }
    
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="31" style="height: 25px">
                    <img src="../images/module.gif" width="20" height="22"></td>
                <td style="width: 232px; height: 25px;">
                    <asp:Label ID="lblPath" runat="server"></asp:Label></td>
                <td width="81%" align="right" style="height: 25px">
                    <img src="../images/search.gif" alt="搜索" width="16" height="16" />供货商名：<asp:TextBox
                        ID="txtContent" runat="server" CssClass="input1"></asp:TextBox>联系人：<asp:TextBox
                        ID="txtuser" runat="server" CssClass="input1"></asp:TextBox>仓库地址：<asp:TextBox
                        ID="txtadres" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="submit" OnClick="btnSearch_Click"  /></td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <asp:GridView ID="GvData" runat="server" Width="99%" AutoGenerateColumns="False"  CssClass="gridview" EmptyDataText="没有数据" OnRowDataBound="GvData_RowDataBound">
           
            <Columns>
                <asp:BoundField HeaderText="供货商ID" DataField="SupplierId" />
                <asp:BoundField HeaderText="供货商名" DataField="Supplier" />
                <asp:BoundField HeaderText="联系人" DataField="suppMan" />
                <asp:BoundField HeaderText="联系电话" DataField="Phone"/>
                <asp:BoundField HeaderText="联系地址" DataField="Address"/>
                <asp:BoundField HeaderText="入库记录" DataField="Stock"/>
                <asp:BoundField HeaderText="编辑人" DataField="EditUserName"/>
                <asp:BoundField HeaderText="编辑时间" DataField="eidtdat"/>
                <asp:BoundField HeaderText="审核状态" DataField="AuditState"/>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkbtnEdit" CommandArgument='<%#Eval("SupplierId") %>' runat="server" OnClick="lnkbtnEdit_Click">修改</asp:LinkButton>
                        <asp:LinkButton ID="lnkbtnFlag" CommandArgument='<%#Eval("SupplierId") %>' runat="server" OnClick="lnkbtnFlag_Click">审核</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                   <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <asp:CheckBox ID="ckFlag" runat="server"  />
                    </ItemTemplate>
                    <ItemStyle Width="40px" HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Center" />
            <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
        </asp:GridView>
        <table width="99%" border="0" cellspacing="0" cellpadding="0">
            <tr>
             <td style="width: 120px">
                </td>
                <td align="right">
                   <uc1:PageNavigator ID="PageNavigator1" runat="server" DataId="GvData" ConnectionString="connstr" ShowType="Text" PageSize="20" />
                </td>
                <td height="5" align="right">
                    <input type="checkbox" name="chkall" onclick="CheckAll(this.form)" value="on"><font
                        color="#FF0000">全选</font>&nbsp;
                    <asp:Button ID="btnAdd" runat="server" Text="添加" CssClass="submit" CausesValidation="False"
                        OnClick="btnAdd_Click" />&nbsp;<asp:Button ID="btnFlag" runat="server" Text="批审" CssClass="submit" OnClick="btnFlag_Click" OnClientClick="return confirm('确定要审核吗?')" />
                    <asp:Button
                        ID="btnDel" runat="server" Text="删除" CssClass="submit" OnClick="btnDel_Click" OnClientClick="return confirm('确定要删除吗?')" />
                </td>
            </tr>
        </table>
       
         <asp:HiddenField ID="hfuserId" runat="server" />
         <asp:HiddenField ID="hfxs" runat="server" />
    </form>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
 senfe("GvData","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>